﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdGiContextForDbDatabase : OdGiDefaultContext
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiContextForDbDatabase(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdGiContextForDbDatabase_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiContextForDbDatabase obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiContextForDbDatabase()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdGiContextForDbDatabase(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdGiContextForDbDatabase cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdGiContextForDbDatabase_cast(OdRxObject.getCPtr(pObj));
			OdGiContextForDbDatabase result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiContextForDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiContextForDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiContextForDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdGiContextForDbDatabase_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdGiContextForDbDatabase_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdGiContextForDbDatabase_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdGiContextForDbDatabase createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdGiContextForDbDatabase_createObject();
			OdGiContextForDbDatabase result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiContextForDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiContextForDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiContextForDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject database()
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdGiContextForDbDatabase_database(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGiDrawable openDrawable(OdDbStub drawableId)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdGiContextForDbDatabase_openDrawable(this.swigCPtr, OdDbStub.getCPtr(drawableId));
			OdGiDrawable result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint numberOfIsolines()
		{
			uint result = TD_DbPINVOKE.OdGiContextForDbDatabase_numberOfIsolines(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual double commonLinetypeScale()
		{
			double result = TD_DbPINVOKE.OdGiContextForDbDatabase_commonLinetypeScale(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual LineWeight defaultLineWeight()
		{
			LineWeight result = (LineWeight)TD_DbPINVOKE.OdGiContextForDbDatabase_defaultLineWeight(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool quickTextMode()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_quickTextMode(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint textQuality()
		{
			uint result = TD_DbPINVOKE.OdGiContextForDbDatabase_textQuality(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGiContext.ImageQuality imageQuality()
		{
			OdGiContext.ImageQuality result = (OdGiContext.ImageQuality)TD_DbPINVOKE.OdGiContextForDbDatabase_imageQuality(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint fadingIntensityPercentage()
		{
			uint result = TD_DbPINVOKE.OdGiContextForDbDatabase_fadingIntensityPercentage(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool ttfPolyDraw()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_ttfPolyDraw(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDatabase(OdDbDatabase pDb, bool bTrackDbDestroy)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setDatabase__SWIG_0(this.swigCPtr, OdDbDatabase.getCPtr(pDb), bTrackDbDestroy);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setDatabase(OdDbDatabase pDb)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setDatabase__SWIG_1(this.swigCPtr, OdDbDatabase.getCPtr(pDb));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbDatabase getDatabase()
		{
			OdDbDatabase result = (OdDbDatabase)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdGiContextForDbDatabase_getDatabase(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void fillGsClientViewInfo(OdDbObjectId vpId, OdGsClientViewInfo viewInfo)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_fillGsClientViewInfo(this.swigCPtr, OdDbObjectId.getCPtr(vpId), OdGsClientViewInfo.getCPtr(viewInfo));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdDbStub getStubByID(ulong objectId)
		{
			IntPtr intPtr = TD_DbPINVOKE.OdGiContextForDbDatabase_getStubByID(this.swigCPtr, objectId);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdDbStub getStubByMatName(string strMatName)
		{
			IntPtr intPtr = TD_DbPINVOKE.OdGiContextForDbDatabase_getStubByMatName(this.swigCPtr, strMatName);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void getDefaultTextStyle(OdGiTextStyle textStyle)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_getDefaultTextStyle(this.swigCPtr, OdGiTextStyle.getCPtr(textStyle).Handle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual uint circleZoomPercent(OdDbStub viewportId)
		{
			uint result = TD_DbPINVOKE.OdGiContextForDbDatabase_circleZoomPercent(this.swigCPtr, OdDbStub.getCPtr(viewportId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual IntPtr drawableFilterFunctionId(OdDbStub viewportId)
		{
			IntPtr result = TD_DbPINVOKE.OdGiContextForDbDatabase_drawableFilterFunctionId(this.swigCPtr, OdDbStub.getCPtr(viewportId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint drawableFilterFunction(IntPtr functionId, OdGiDrawable pDrawable, uint nFlags)
		{
			uint result = TD_DbPINVOKE.OdGiContextForDbDatabase_drawableFilterFunction(this.swigCPtr, functionId, OdGiDrawable.getCPtr(pDrawable), nFlags);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool useGsModel()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_useGsModel(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void enableGsModel(bool enable)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_enableGsModel(this.swigCPtr, enable);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual bool isPlotGeneration()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_isPlotGeneration(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setPlotGeneration(bool plotGeneration)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setPlotGeneration(this.swigCPtr, plotGeneration);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual bool isZeroTextNormals()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_isZeroTextNormals(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setZeroTextNormals(bool bZeroTextNormals)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setZeroTextNormals(this.swigCPtr, bZeroTextNormals);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isLayoutHelperLinkReactorsDisabled()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_isLayoutHelperLinkReactorsDisabled(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void disableLayoutHelperLinkReactors(bool bDisableLinkReactors)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_disableLayoutHelperLinkReactors(this.swigCPtr, bDisableLinkReactors);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isContextualColorsManagementEnabled()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_isContextualColorsManagementEnabled(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void enableContextualColorsManagement(bool bEnable)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_enableContextualColorsManagement(this.swigCPtr, bEnable);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void updateContextualColors(OdGsView pView)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_updateContextualColors(this.swigCPtr, OdGsView.getCPtr(pView));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void fillContextualColors(OdGiContextualColorsImpl pCtxColors)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_fillContextualColors(this.swigCPtr, OdGiContextualColorsImpl.getCPtr(pCtxColors));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setTtfPolyDrawMode(bool bPolyDraw)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setTtfPolyDrawMode(this.swigCPtr, bPolyDraw);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isKeepPSLayoutHelperViewEnabled()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_isKeepPSLayoutHelperViewEnabled(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void enableKeepPSLayoutHelperView(bool bEnable)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_enableKeepPSLayoutHelperView(this.swigCPtr, bEnable);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool erasePSLayoutHelperView()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_erasePSLayoutHelperView(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setErasePSLayoutHelperView(bool bOn)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setErasePSLayoutHelperView(this.swigCPtr, bOn);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isConstantModelSpaceLineweightsEnabled()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_isConstantModelSpaceLineweightsEnabled(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void enableConstantModelSpaceLineweights(bool bEnable)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_enableConstantModelSpaceLineweights(this.swigCPtr, bEnable);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual bool fillTtf()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_fillTtf(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool fillMode()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_fillMode(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint paletteBackground()
		{
			uint result = TD_DbPINVOKE.OdGiContextForDbDatabase_paletteBackground(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void setPaletteBackground(uint paletteBackground)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setPaletteBackground(this.swigCPtr, paletteBackground);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void loadPlotStyleTable(OdStreamBuf pStreamBuf)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_loadPlotStyleTable(this.swigCPtr, OdStreamBuf.getCPtr(pStreamBuf));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGiContext.PStyleType plotStyleType()
		{
			OdGiContext.PStyleType result = (OdGiContext.PStyleType)TD_DbPINVOKE.OdGiContextForDbDatabase_plotStyleType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void plotStyle(int penNumber, OdPsPlotStyleData plotStyleData)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_plotStyle__SWIG_0(this.swigCPtr, penNumber, OdPsPlotStyleData.getCPtr(plotStyleData));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void plotStyle(OdDbStub psNameId, OdPsPlotStyleData plotStyleData)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_plotStyle__SWIG_1(this.swigCPtr, OdDbStub.getCPtr(psNameId), OdPsPlotStyleData.getCPtr(plotStyleData));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGiSectionGeometryManager getSectionGeometryManager()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdGiContextForDbDatabase_getSectionGeometryManager(this.swigCPtr);
			OdGiSectionGeometryManager result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiSectionGeometryManager)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiSectionGeometryManager)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiSectionGeometryManager)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint antiAliasingMode()
		{
			uint result = TD_DbPINVOKE.OdGiContextForDbDatabase_antiAliasingMode(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool xrefPropertiesOverride()
		{
			bool result = TD_DbPINVOKE.OdGiContextForDbDatabase_xrefPropertiesOverride(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGiContextForDbDatabase.SolidHatchAsPolygonMode hatchAsPolygon()
		{
			OdGiContextForDbDatabase.SolidHatchAsPolygonMode result = (OdGiContextForDbDatabase.SolidHatchAsPolygonMode)TD_DbPINVOKE.OdGiContextForDbDatabase_hatchAsPolygon(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setHatchAsPolygon(OdGiContextForDbDatabase.SolidHatchAsPolygonMode mode)
		{
			TD_DbPINVOKE.OdGiContextForDbDatabase_setHatchAsPolygon(this.swigCPtr, (int)mode);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public enum SolidHatchAsPolygonMode
		{
			kHatchTriangulation,
			kHatchPolygon,
			kHatchBoth
		}
	}
}
